// interface of module 'dynamic'.
#include "dynamic.h"

// import interface.
#include <stdio.h>
#include <assert.h>
#include <windows.h>

int counter = 1000;

BOOL WINAPI DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID pvReserved) {
	switch (dwReason)
	{
		case DLL_PROCESS_ATTACH:
			{
				printf("process attached\n");
			}
			break;

		case DLL_PROCESS_DETACH:
			{
				printf("process detached\n");
			}
			break;

		case DLL_THREAD_ATTACH:
			{
				printf("thread attached\n");
			}
			break;

		case DLL_THREAD_DETACH:
			{
				printf("thread detached\n");
			}
			break;
	}
	return TRUE;
}

void WINAPI ShowMsgCmd(void) {
	printf("message in console.\n");
}

void WINAPI ShowMsgGui(void) {
	MessageBox(NULL, "message in window", NULL, MB_OK);
}
